--------------------------------------------------------
--  DDL for Trigger BLOB_UPLOAD_PK_TRG
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "BLOB_UPLOAD_PK_TRG" 
   before insert on  "BLOB_UPLOAD" 
   for each row 
begin  
   if inserting then 
      if :NEW."BLOB_ID" is null then 
         select BLOB_UPLOAD_SEQ.nextval into :NEW."BLOB_ID" from dual; 		 
      end if; 
	  :NEW.SESSION_ID := coalesce(v('APP_SESSION'),0);
   end if; 
end;
ALTER TRIGGER "BLOB_UPLOAD_PK_TRG" ENABLE
